/**
 * 关注提示弹窗
 */
export const followDialog = ()=> {
    // const body = document.getElementsByTagName('body')[0]
    // console.log("body",body)
    // const str = `<h1>哈哈哈哈哈哈哈</h1>`
    // body.appendChild(str)
    const mask = document.createElement("div")
    mask.setAttribute("class",'ewmWrap')
    mask.setAttribute("style","position:fixed;z-index: 1000;display: flex;left: 0;top: 0;width: 100%;height: 100%;background:rgba(0,0,0,0.5);justify-content: center;align-items: center; ");

    const div_box = document.createElement("div")
    div_box.setAttribute("class",'ewmBox')
    div_box.setAttribute("style","background: #fff;text-align: center;border-radius: 7px;position: relative;z-index: 1000;;");

    const close_img = document.createElement('img')
    close_img.src = '/images/close.png'
    close_img.setAttribute('style','position: absolute;width:30px;height:30px;z-index: 1000;left: 50%;top: -50px;color: #fff;transform: translate(-50%,0);-webkit-transform: translate(-50%,0);')
    div_box.appendChild(close_img)
    // 添加点击事件
    close_img.addEventListener('click',function(){
        document.body.removeChild(mask)
    })

    const img = document.createElement('img')
    img.src = '/images/ewm.jpg'
    img.setAttribute('style','width: 200px;height: 200px;border-radius: 7px;')
    div_box.appendChild(img)

    const op = document.createElement('p')
    op.setAttribute("style",'padding: 0 10px 22px 10px;font-size:12px')
    op.innerText = '请长按二维码识别关注公众号！'
    div_box.appendChild(op)

    mask.appendChild(div_box)

    document.body.appendChild(mask)
}